package cn.zqh.brand.client;


import cn.zqh.bean.api.CommonResult;
import cn.zqh.bean.bo.AdminChangeUserInfo;
import cn.zqh.bean.bo.User;
import cn.zqh.brand.config.DefaultFeignConfiguration;
import cn.zqh.brand.interceptor.FeignInterceptor;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(value = "bs-user",configuration = { DefaultFeignConfiguration.class, FeignInterceptor.class})
public interface UserClient {

    /**
      * @Author: zqh
      * @Date:
      * @Description: 通过id查询某个用户信息
    */

    @ApiOperation("通过id查询某个用户信息")
    @GetMapping(value = "/user/getUserById")
    public User getUserById(@RequestParam("userId") String userId);


    /**
     * @Author: zqh
     * @Date:
     * @Description: 管理员修改用户信息
     */
    @ApiOperation(value = "管理员修改用户信息")
    @PostMapping(value = "/user/adminChangeInfo")
    @ResponseBody
    public String adminChangeInfo(@RequestBody AdminChangeUserInfo adminChangeUserInfo);


    @ApiOperation(value = "管理员钱增加")
    @PostMapping(value = "/user/addMoney")
    public String AdminUserAddMoney(@RequestParam("money") Double money);



    /**
     * @Author: zqh
     * @Date:
     * @Description: 用户钱减少
     */
    @ApiOperation(value = "用户钱减少")
    @PostMapping(value = "/user/userReMoney")
    public String userReMoney(@RequestParam("userId") String userId,@RequestParam("money") Double money);
}
